using System;
using System.Collections;

namespace Com.CMS263.PO
{
	#region Image

	/// <summary>
	/// Image object for NHibernate mapped table 'Image'.
	/// </summary>
	public class Image
	{
		#region Member Variables
		
		protected int _id;
		protected string _name;
		protected string _path;
		protected int _orderNum;
		protected DateTime _addDate;
		protected string _type;
		protected int _modelId;

		#endregion

		#region Constructors

		public Image() { }

		public Image( string name, string path, int orderNum, DateTime addDate, string type, int modelId )
		{
			this._name = name;
			this._path = path;
			this._orderNum = orderNum;
			this._addDate = addDate;
			this._type = type;
			this._modelId = modelId;
		}

		#endregion

		#region Public Properties

		public virtual int Id
		{
			get {return _id;}
			set {_id = value;}
		}

		public  virtual string Name
		{
			get { return _name; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for Name", value, value.ToString());
				_name = value;
			}
		}

		public  virtual string Path
		{
			get { return _path; }
			set
			{
				if ( value != null && value.Length > 200)
					throw new ArgumentOutOfRangeException("Invalid value for Path", value, value.ToString());
				_path = value;
			}
		}

		public  virtual int OrderNum
		{
			get { return _orderNum; }
			set { _orderNum = value; }
		}

		public  virtual DateTime AddDate
		{
			get { return _addDate; }
			set { _addDate = value; }
		}

		public  virtual string Type
		{
			get { return _type; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for Type", value, value.ToString());
				_type = value;
			}
		}

		public  virtual int ModelId
		{
			get { return _modelId; }
			set { _modelId = value; }
		}

		

		#endregion
	}
	#endregion
}